.class Lcom/netease/newsreader/activity/MainIndexActivity$5;
.super Ljava/lang/Thread;
.source "MainIndexActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/netease/newsreader/activity/MainIndexActivity;->onCreate(Landroid/os/Bundle;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/netease/newsreader/activity/MainIndexActivity;


# direct methods
.method constructor <init>(Lcom/netease/newsreader/activity/MainIndexActivity;)V
    .locals 0
    .parameter

    .prologue
    .line 1
    iput-object p1, p0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    .line 155
    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 25

    .prologue
    .line 161
    :try_start_0
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    move-object/from16 v0, v21

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity;->db:Landroid/database/sqlite/SQLiteDatabase;

    move-object/from16 v21, v0

    const-string v22, "SELECT count(*) from city_list"

    const/16 v23, 0x0

    invoke-virtual/range {v21 .. v23}, Landroid/database/sqlite/SQLiteDatabase;->rawQuery(Ljava/lang/String;[Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v5

    .line 162
    .local v5, cursor:Landroid/database/Cursor;
    const-wide/16 v2, 0x0

    .line 163
    .local v2, count:J
    if-eqz v5, :cond_1

    .line 164
    invoke-interface {v5}, Landroid/database/Cursor;->moveToFirst()Z

    move-result v21

    if-eqz v21, :cond_0

    .line 165
    const/16 v21, 0x0

    move/from16 v0, v21

    invoke-interface {v5, v0}, Landroid/database/Cursor;->getLong(I)J

    move-result-wide v2

    .line 167
    :cond_0
    invoke-interface {v5}, Landroid/database/Cursor;->close()V

    .line 170
    :cond_1
    const-wide/16 v21, 0x0

    cmp-long v21, v2, v21

    if-nez v21, :cond_2

    .line 171
    const-string v21, "insert city"

    invoke-static/range {v21 .. v21}, Lcom/netease/newsreader/util/Logger;->d(Ljava/lang/String;)V

    .line 172
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    move-object/from16 v0, v21

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity;->db:Landroid/database/sqlite/SQLiteDatabase;

    move-object/from16 v21, v0

    invoke-virtual/range {v21 .. v21}, Landroid/database/sqlite/SQLiteDatabase;->beginTransaction()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1

    .line 174
    :try_start_1
    new-instance v17, Ljava/util/Scanner;

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    invoke-virtual/range {v21 .. v21}, Lcom/netease/newsreader/activity/MainIndexActivity;->getAssets()Landroid/content/res/AssetManager;

    move-result-object v21

    const-string v22, "city_list"

    invoke-virtual/range {v21 .. v22}, Landroid/content/res/AssetManager;->open(Ljava/lang/String;)Ljava/io/InputStream;

    move-result-object v21

    move-object/from16 v0, v17

    move-object/from16 v1, v21

    invoke-direct {v0, v1}, Ljava/util/Scanner;-><init>(Ljava/io/InputStream;)V

    .line 175
    .local v17, scanner:Ljava/util/Scanner;
    :goto_0
    invoke-virtual/range {v17 .. v17}, Ljava/util/Scanner;->hasNext()Z

    move-result v21

    if-nez v21, :cond_5

    .line 180
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    move-object/from16 v0, v21

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity;->db:Landroid/database/sqlite/SQLiteDatabase;

    move-object/from16 v21, v0

    invoke-virtual/range {v21 .. v21}, Landroid/database/sqlite/SQLiteDatabase;->setTransactionSuccessful()V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    .line 184
    .end local v17           #scanner:Ljava/util/Scanner;
    :goto_1
    :try_start_2
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    move-object/from16 v0, v21

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity;->db:Landroid/database/sqlite/SQLiteDatabase;

    move-object/from16 v21, v0

    invoke-virtual/range {v21 .. v21}, Landroid/database/sqlite/SQLiteDatabase;->endTransaction()V

    .line 187
    :cond_2
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    invoke-static/range {v21 .. v21}, Lcom/netease/newsreader/util/Tools;->CheckNetwork(Landroid/content/Context;)Z

    move-result v7

    .line 189
    .local v7, isAvailable:Z
    new-instance v21, Ljava/lang/StringBuilder;

    const-string v22, "network is "

    invoke-direct/range {v21 .. v22}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move-object/from16 v0, v21

    invoke-virtual {v0, v7}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v21

    invoke-virtual/range {v21 .. v21}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v21

    invoke-static/range {v21 .. v21}, Lcom/netease/newsreader/util/Logger;->i(Ljava/lang/String;)V

    .line 191
    if-eqz v7, :cond_c

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    move-object/from16 v0, v21

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity;->app:Lcom/netease/newsreader/activity/MyApplication;

    move-object/from16 v21, v0

    invoke-static/range {v21 .. v21}, Lcom/netease/newsreader/util/Tools;->isWifi(Landroid/content/Context;)Z

    move-result v21

    if-eqz v21, :cond_c

    .line 193
    const-string v21, "http://m.163.com/special/newsclient/android_notice.html"

    const/16 v22, 0x9c4

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v23, v0

    invoke-static/range {v21 .. v23}, Lcom/netease/newsreader/util/HttpUtils;->getResponseFromGetUrl4GBK(Ljava/lang/String;ILandroid/content/Context;)Ljava/lang/String;

    move-result-object v16

    .line 194
    .local v16, result:Ljava/lang/String;
    const-string v21, "result, "

    move-object/from16 v0, v21

    move-object/from16 v1, v16

    invoke-static {v0, v1}, Lcom/netease/newsreader/util/Logger;->i(Ljava/lang/String;Ljava/lang/String;)V

    .line 196
    const/4 v10, 0x0

    .line 198
    .local v10, obj:Lorg/json/JSONObject;
    new-instance v10, Lorg/json/JSONObject;

    .end local v10           #obj:Lorg/json/JSONObject;
    move-object/from16 v0, v16

    invoke-direct {v10, v0}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    .line 200
    .restart local v10       #obj:Lorg/json/JSONObject;
    if-eqz v10, :cond_4

    .line 201
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    const-string v22, "app_version"

    move-object/from16 v0, v22

    invoke-virtual {v10, v0}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v22

    invoke-static/range {v21 .. v22}, Lcom/netease/newsreader/activity/MainIndexActivity;->access$12(Lcom/netease/newsreader/activity/MainIndexActivity;Ljava/lang/String;)V

    .line 202
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    const-string v22, "title"

    move-object/from16 v0, v22

    invoke-virtual {v10, v0}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v22

    invoke-static/range {v21 .. v22}, Lcom/netease/newsreader/activity/MainIndexActivity;->access$13(Lcom/netease/newsreader/activity/MainIndexActivity;Ljava/lang/String;)V

    .line 203
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    const-string v22, "content"

    move-object/from16 v0, v22

    invoke-virtual {v10, v0}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v22

    invoke-static/range {v21 .. v22}, Lcom/netease/newsreader/activity/MainIndexActivity;->access$14(Lcom/netease/newsreader/activity/MainIndexActivity;Ljava/lang/String;)V

    .line 204
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    const-string v22, "type"

    move-object/from16 v0, v22

    invoke-virtual {v10, v0}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v22

    invoke-static/range {v21 .. v22}, Lcom/netease/newsreader/activity/MainIndexActivity;->access$15(Lcom/netease/newsreader/activity/MainIndexActivity;Ljava/lang/String;)V

    .line 205
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    const-string v22, "custom_default"

    move-object/from16 v0, v22

    invoke-virtual {v10, v0}, Lorg/json/JSONObject;->getJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v22

    invoke-static/range {v21 .. v22}, Lcom/netease/newsreader/activity/MainIndexActivity;->access$16(Lcom/netease/newsreader/activity/MainIndexActivity;Lorg/json/JSONArray;)V

    .line 207
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    invoke-virtual/range {v21 .. v21}, Lcom/netease/newsreader/activity/MainIndexActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v21

    const v22, 0x7f0b0002

    invoke-virtual/range {v21 .. v22}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v13

    .line 208
    .local v13, oversion:Ljava/lang/String;
    const/16 v21, 0x1

    move/from16 v0, v21

    invoke-virtual {v13, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v13

    .line 210
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    invoke-static/range {v21 .. v21}, Lcom/netease/newsreader/activity/MainIndexActivity;->access$17(Lcom/netease/newsreader/activity/MainIndexActivity;)Lorg/json/JSONArray;

    move-result-object v21

    if-eqz v21, :cond_3

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    invoke-static/range {v21 .. v21}, Lcom/netease/newsreader/activity/MainIndexActivity;->access$17(Lcom/netease/newsreader/activity/MainIndexActivity;)Lorg/json/JSONArray;

    move-result-object v21

    invoke-virtual/range {v21 .. v21}, Lorg/json/JSONArray;->length()I

    move-result v21

    if-lez v21, :cond_3

    .line 211
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    invoke-static/range {v21 .. v21}, Lcom/netease/newsreader/activity/MainIndexActivity;->access$17(Lcom/netease/newsreader/activity/MainIndexActivity;)Lorg/json/JSONArray;

    move-result-object v21

    const/16 v22, 0x0

    invoke-virtual/range {v21 .. v22}, Lorg/json/JSONArray;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lorg/json/JSONObject;

    .line 212
    .local v4, coverobj:Lorg/json/JSONObject;
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    const-string v22, "src"

    move-object/from16 v0, v22

    invoke-virtual {v4, v0}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v22

    invoke-static/range {v21 .. v22}, Lcom/netease/newsreader/activity/MainIndexActivity;->access$18(Lcom/netease/newsreader/activity/MainIndexActivity;Ljava/lang/String;)V

    .line 214
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    const-string v22, "start"

    move-object/from16 v0, v22

    invoke-virtual {v4, v0}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v22

    invoke-static/range {v21 .. v22}, Lcom/netease/newsreader/activity/MainIndexActivity;->access$19(Lcom/netease/newsreader/activity/MainIndexActivity;Ljava/lang/String;)V

    .line 215
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    const-string v22, "end"

    move-object/from16 v0, v22

    invoke-virtual {v4, v0}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v22

    invoke-static/range {v21 .. v22}, Lcom/netease/newsreader/activity/MainIndexActivity;->access$20(Lcom/netease/newsreader/activity/MainIndexActivity;Ljava/lang/String;)V

    .line 216
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    invoke-static/range {v21 .. v21}, Lcom/netease/newsreader/activity/MainIndexActivity;->access$1(Lcom/netease/newsreader/activity/MainIndexActivity;)Landroid/os/Handler;

    move-result-object v21

    const/16 v22, 0x4

    invoke-virtual/range {v21 .. v22}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    .line 219
    .end local v4           #coverobj:Lorg/json/JSONObject;
    :cond_3
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    invoke-static/range {v21 .. v21}, Lcom/netease/newsreader/activity/MainIndexActivity;->access$9(Lcom/netease/newsreader/activity/MainIndexActivity;)Landroid/content/SharedPreferences;

    move-result-object v21

    const-string v22, "tip_never"

    const/16 v23, 0x0

    invoke-interface/range {v21 .. v23}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v20

    .line 221
    .local v20, tip_never:Z
    if-eqz v20, :cond_9

    .line 223
    const-string v21, "update"

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v22, v0

    invoke-static/range {v22 .. v22}, Lcom/netease/newsreader/activity/MainIndexActivity;->access$21(Lcom/netease/newsreader/activity/MainIndexActivity;)Ljava/lang/String;

    move-result-object v22

    invoke-virtual/range {v21 .. v22}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v21

    if-eqz v21, :cond_7

    .line 225
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    invoke-static/range {v21 .. v21}, Lcom/netease/newsreader/activity/MainIndexActivity;->access$9(Lcom/netease/newsreader/activity/MainIndexActivity;)Landroid/content/SharedPreferences;

    move-result-object v21

    const-string v22, "version"

    const-string v23, ""

    invoke-interface/range {v21 .. v23}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v15

    .line 227
    .local v15, pre_versioin:Ljava/lang/String;
    const-wide/16 v8, 0x0

    .line 228
    .local v8, nv:J
    const-wide/16 v11, 0x0

    .line 230
    .local v11, ov:J
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    invoke-static/range {v21 .. v21}, Lcom/netease/newsreader/activity/MainIndexActivity;->access$22(Lcom/netease/newsreader/activity/MainIndexActivity;)Ljava/lang/String;

    move-result-object v21

    const-string v22, "."

    const-string v23, ""

    invoke-virtual/range {v21 .. v23}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v21

    invoke-static/range {v21 .. v21}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J

    move-result-wide v8

    .line 231
    const-string v21, "."

    const-string v22, ""

    move-object/from16 v0, v21

    move-object/from16 v1, v22

    invoke-virtual {v13, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v21

    invoke-static/range {v21 .. v21}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J

    move-result-wide v11

    .line 234
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    invoke-static/range {v21 .. v21}, Lcom/netease/newsreader/activity/MainIndexActivity;->access$22(Lcom/netease/newsreader/activity/MainIndexActivity;)Ljava/lang/String;

    move-result-object v21

    move-object/from16 v0, v21

    invoke-virtual {v15, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v21

    if-nez v21, :cond_6

    cmp-long v21, v8, v11

    if-lez v21, :cond_6

    .line 235
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    invoke-static/range {v21 .. v21}, Lcom/netease/newsreader/activity/MainIndexActivity;->access$1(Lcom/netease/newsreader/activity/MainIndexActivity;)Landroid/os/Handler;

    move-result-object v21

    const/16 v22, 0x1

    invoke-virtual/range {v21 .. v22}, Landroid/os/Handler;->sendEmptyMessage(I)Z
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_1

    .line 278
    .end local v2           #count:J
    .end local v5           #cursor:Landroid/database/Cursor;
    .end local v7           #isAvailable:Z
    .end local v8           #nv:J
    .end local v10           #obj:Lorg/json/JSONObject;
    .end local v11           #ov:J
    .end local v13           #oversion:Ljava/lang/String;
    .end local v15           #pre_versioin:Ljava/lang/String;
    .end local v16           #result:Ljava/lang/String;
    .end local v20           #tip_never:Z
    :cond_4
    :goto_2
    return-void

    .line 176
    .restart local v2       #count:J
    .restart local v5       #cursor:Landroid/database/Cursor;
    .restart local v17       #scanner:Ljava/util/Scanner;
    :cond_5
    :try_start_3
    invoke-virtual/range {v17 .. v17}, Ljava/util/Scanner;->nextLine()Ljava/lang/String;

    move-result-object v19

    .line 177
    .local v19, str:Ljava/lang/String;
    const-string v21, "\\|"

    move-object/from16 v0, v19

    move-object/from16 v1, v21

    invoke-virtual {v0, v1}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v18

    .line 178
    .local v18, ss:[Ljava/lang/String;
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    move-object/from16 v0, v21

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity;->db:Landroid/database/sqlite/SQLiteDatabase;

    move-object/from16 v21, v0

    const/16 v22, 0x1

    aget-object v22, v18, v22

    const/16 v23, 0x0

    aget-object v23, v18, v23

    const/16 v24, 0x2

    aget-object v24, v18, v24

    invoke-static/range {v21 .. v24}, Lcom/netease/newsreader/db/DBUtils;->insertDataToCityTable(Landroid/database/sqlite/SQLiteDatabase;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    :try_end_3
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_0

    goto/16 :goto_0

    .line 181
    .end local v17           #scanner:Ljava/util/Scanner;
    .end local v18           #ss:[Ljava/lang/String;
    .end local v19           #str:Ljava/lang/String;
    :catch_0
    move-exception v21

    goto/16 :goto_1

    .line 237
    .restart local v7       #isAvailable:Z
    .restart local v8       #nv:J
    .restart local v10       #obj:Lorg/json/JSONObject;
    .restart local v11       #ov:J
    .restart local v13       #oversion:Ljava/lang/String;
    .restart local v15       #pre_versioin:Ljava/lang/String;
    .restart local v16       #result:Ljava/lang/String;
    .restart local v20       #tip_never:Z
    :cond_6
    :try_start_4
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    invoke-static/range {v21 .. v21}, Lcom/netease/newsreader/activity/MainIndexActivity;->access$1(Lcom/netease/newsreader/activity/MainIndexActivity;)Landroid/os/Handler;

    move-result-object v21

    const/16 v22, 0x3

    invoke-virtual/range {v21 .. v22}, Landroid/os/Handler;->sendEmptyMessage(I)Z
    :try_end_4
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_1

    goto :goto_2

    .line 273
    .end local v2           #count:J
    .end local v5           #cursor:Landroid/database/Cursor;
    .end local v7           #isAvailable:Z
    .end local v8           #nv:J
    .end local v10           #obj:Lorg/json/JSONObject;
    .end local v11           #ov:J
    .end local v13           #oversion:Ljava/lang/String;
    .end local v15           #pre_versioin:Ljava/lang/String;
    .end local v16           #result:Ljava/lang/String;
    .end local v20           #tip_never:Z
    :catch_1
    move-exception v6

    .line 274
    .local v6, e:Ljava/lang/Exception;
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    invoke-static/range {v21 .. v21}, Lcom/netease/newsreader/activity/MainIndexActivity;->access$1(Lcom/netease/newsreader/activity/MainIndexActivity;)Landroid/os/Handler;

    move-result-object v21

    const/16 v22, 0x3

    invoke-virtual/range {v21 .. v22}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    .line 275
    invoke-virtual {v6}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_2

    .line 241
    .end local v6           #e:Ljava/lang/Exception;
    .restart local v2       #count:J
    .restart local v5       #cursor:Landroid/database/Cursor;
    .restart local v7       #isAvailable:Z
    .restart local v10       #obj:Lorg/json/JSONObject;
    .restart local v13       #oversion:Ljava/lang/String;
    .restart local v16       #result:Ljava/lang/String;
    .restart local v20       #tip_never:Z
    :cond_7
    :try_start_5
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    invoke-static/range {v21 .. v21}, Lcom/netease/newsreader/activity/MainIndexActivity;->access$9(Lcom/netease/newsreader/activity/MainIndexActivity;)Landroid/content/SharedPreferences;

    move-result-object v21

    const-string v22, "notice"

    const-string v23, ""

    invoke-interface/range {v21 .. v23}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v14

    .line 243
    .local v14, pre_notice:Ljava/lang/String;
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    invoke-static/range {v21 .. v21}, Lcom/netease/newsreader/activity/MainIndexActivity;->access$23(Lcom/netease/newsreader/activity/MainIndexActivity;)Ljava/lang/String;

    move-result-object v21

    move-object/from16 v0, v21

    invoke-virtual {v14, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v21

    if-nez v21, :cond_8

    .line 244
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    invoke-static/range {v21 .. v21}, Lcom/netease/newsreader/activity/MainIndexActivity;->access$1(Lcom/netease/newsreader/activity/MainIndexActivity;)Landroid/os/Handler;

    move-result-object v21

    const/16 v22, 0x2

    invoke-virtual/range {v21 .. v22}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    goto/16 :goto_2

    .line 246
    :cond_8
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    invoke-static/range {v21 .. v21}, Lcom/netease/newsreader/activity/MainIndexActivity;->access$1(Lcom/netease/newsreader/activity/MainIndexActivity;)Landroid/os/Handler;

    move-result-object v21

    const/16 v22, 0x3

    invoke-virtual/range {v21 .. v22}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    goto/16 :goto_2

    .line 251
    .end local v14           #pre_notice:Ljava/lang/String;
    :cond_9
    const-string v21, "update"

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v22, v0

    invoke-static/range {v22 .. v22}, Lcom/netease/newsreader/activity/MainIndexActivity;->access$21(Lcom/netease/newsreader/activity/MainIndexActivity;)Ljava/lang/String;

    move-result-object v22

    invoke-virtual/range {v21 .. v22}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v21

    if-eqz v21, :cond_b

    .line 253
    const-wide/16 v8, 0x0

    .line 254
    .restart local v8       #nv:J
    const-wide/16 v11, 0x0

    .line 256
    .restart local v11       #ov:J
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    invoke-static/range {v21 .. v21}, Lcom/netease/newsreader/activity/MainIndexActivity;->access$22(Lcom/netease/newsreader/activity/MainIndexActivity;)Ljava/lang/String;

    move-result-object v21

    const-string v22, "."

    const-string v23, ""

    invoke-virtual/range {v21 .. v23}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v21

    invoke-static/range {v21 .. v21}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J

    move-result-wide v8

    .line 257
    const-string v21, "."

    const-string v22, ""

    move-object/from16 v0, v21

    move-object/from16 v1, v22

    invoke-virtual {v13, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v21

    invoke-static/range {v21 .. v21}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J

    move-result-wide v11

    .line 259
    cmp-long v21, v8, v11

    if-lez v21, :cond_a

    .line 260
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    invoke-static/range {v21 .. v21}, Lcom/netease/newsreader/activity/MainIndexActivity;->access$1(Lcom/netease/newsreader/activity/MainIndexActivity;)Landroid/os/Handler;

    move-result-object v21

    const/16 v22, 0x1

    invoke-virtual/range {v21 .. v22}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    goto/16 :goto_2

    .line 262
    :cond_a
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    invoke-static/range {v21 .. v21}, Lcom/netease/newsreader/activity/MainIndexActivity;->access$1(Lcom/netease/newsreader/activity/MainIndexActivity;)Landroid/os/Handler;

    move-result-object v21

    const/16 v22, 0x3

    invoke-virtual/range {v21 .. v22}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    goto/16 :goto_2

    .line 265
    .end local v8           #nv:J
    .end local v11           #ov:J
    :cond_b
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    invoke-static/range {v21 .. v21}, Lcom/netease/newsreader/activity/MainIndexActivity;->access$1(Lcom/netease/newsreader/activity/MainIndexActivity;)Landroid/os/Handler;

    move-result-object v21

    const/16 v22, 0x2

    invoke-virtual/range {v21 .. v22}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    goto/16 :goto_2

    .line 271
    .end local v10           #obj:Lorg/json/JSONObject;
    .end local v13           #oversion:Ljava/lang/String;
    .end local v16           #result:Ljava/lang/String;
    .end local v20           #tip_never:Z
    :cond_c
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/netease/newsreader/activity/MainIndexActivity$5;->this$0:Lcom/netease/newsreader/activity/MainIndexActivity;

    move-object/from16 v21, v0

    invoke-static/range {v21 .. v21}, Lcom/netease/newsreader/activity/MainIndexActivity;->access$1(Lcom/netease/newsreader/activity/MainIndexActivity;)Landroid/os/Handler;

    move-result-object v21

    const/16 v22, 0x3

    invoke-virtual/range {v21 .. v22}, Landroid/os/Handler;->sendEmptyMessage(I)Z
    :try_end_5
    .catch Ljava/lang/Exception; {:try_start_5 .. :try_end_5} :catch_1

    goto/16 :goto_2
.end method
